﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WH_Mngr
{
    public delegate void GetPathHandler(string path);
    public partial class Form_data_path : Form
    {
        public event GetPathHandler m_getPathHandler;
        public Form_data_path()
        {
            InitializeComponent();
        }

        private void button_select_path_Click(object sender, EventArgs e)
        {
            folderBrowserDialog1 = new FolderBrowserDialog();

            if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
            {
                this.textBox_data_path.Text = folderBrowserDialog1.SelectedPath;
                //给主窗口传递路径值
                m_getPathHandler(this.textBox_data_path.Text);
            }
        }



        private void Form_data_path_Load(object sender, EventArgs e)
        {

        }


        public void get_data_path(string path)
        {
            this.textBox_data_path.Text = path;
        }
    }
}
